package com.eportal.core;

public class NetTrade {
	
	private String trade_type="";
	private String trade_trace="";
	private String trade_pepdate = "";
	private String trade_amt="";
	private String trade_card="";
	private String trade_termid="";
	private String trade_resqcode="";
	private String trade_cup_trace="";
	private String trade_sellte="";
	private String trade_orderid="";
	private String trade_resqdesc_length="";
	private String trade_resqdesc="";
	
	public NetTrade(){
		
	}
	
	public NetTrade(byte[] src){
		int length = src.length;
		
	}
	
	public byte[] enPack() throws Exception{
		String body = "";
		body += trade_type;
		body += trade_trace;
		body += trade_pepdate = "";
		body += trade_amt;
		body += trade_card;
		body += trade_termid;
		body += trade_resqcode;
		body += trade_cup_trace;
		body += trade_sellte;
		body += trade_orderid;
		if(!trade_resqdesc.equals("")){
		body += Util.addZero(""+trade_resqdesc.getBytes("GBK").length, 3);
		body += trade_resqdesc;
		}
		body = Util.addZero(body.getBytes("GBK").length+"",4)+body;
		return body.getBytes("GBK");
	}
	public String getTrade_pepdate() {
		return trade_pepdate;
	}
	public void setTrade_pepdate(String tradePepdate) {
		trade_pepdate = tradePepdate;
	}
	public String getTrade_orderid() {
		return trade_orderid;
	}
	public void setTrade_orderid(String tradeOrderid) {
		trade_orderid = tradeOrderid;
	}
	public String getTrade_type() {
		return trade_type;
	}
	public void setTrade_type(String tradeType) {
		trade_type = tradeType;
	}
	public String getTrade_termid() {
		return trade_termid;
	}
	public void setTrade_termid(String tradeTermid) {
		trade_termid = tradeTermid;
	}
	public String getTrade_amt() {
		return trade_amt;
	}
	public void setTrade_amt(String tradeAmt) {
		trade_amt = tradeAmt;
	}
	public String getTrade_card() {
		return trade_card;
	}
	public void setTrade_card(String tradeCard) {
		trade_card = tradeCard;
	}
	public String getTrade_trace() {
		return trade_trace;
	}
	public void setTrade_trace(String tradeTrace) {
		trade_trace = tradeTrace;
	}
	public String getTrade_cup_trace() {
		return trade_cup_trace;
	}
	public void setTrade_cup_trace(String tradeCupTrace) {
		trade_cup_trace = tradeCupTrace;
	}
	public String getTrade_sellte() {
		return trade_sellte;
	}
	public void setTrade_sellte(String tradeSellte) {
		trade_sellte = tradeSellte;
	}
	public String getTrade_resqcode() {
		return trade_resqcode;
	}
	public void setTrade_resqcode(String tradeResqcode) {
		trade_resqcode = tradeResqcode;
	}
	public String getTrade_resqdesc() {
		return trade_resqdesc;
	}
	public void setTrade_resqdesc(String tradeResqdesc) {
		trade_resqdesc = tradeResqdesc;
	}
	public String getTrade_resqdesc_length() {
		return trade_resqdesc_length;
	}
	public void setTrade_resqdesc_length(String tradeResqdescLength) {
		trade_resqdesc_length = tradeResqdescLength;
	}
	
	
	
}
